package cn.com.java.mapper;


import cn.com.java.model.Order;
import cn.com.java.model.ShoppingCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    @Select("SELECT o.*,p.name as productName,p.price as price FROM shopping_order o left join product p on p.id = o.product_id  WHERE o.create_by = #{userId}")
    List<Order> selectByUserId(Long userId);
	
}